<template>
  <el-container>
    <!-- 左侧菜单 -->
    <el-aside width="200px" style="background-color: #e9eef3">
      <el-menu
          default-active="welcome"
          router
          @select="handleSelect">
        <el-menu-item index="welcome">
          <span>欢迎</span>
        </el-menu-item>
        <!-- 扩展其他菜单项 -->
        <el-menu-item index="users">
          <span>用户管理</span>
        </el-menu-item>
      </el-menu>
    </el-aside>

    <!-- 右侧内容区 -->
    <el-main>
      <router-view/>
    </el-main>
  </el-container>
</template>

<script setup>
const handleSelect = (key) => {
  console.log('当前选中菜单:', key)
}
</script>